package org.fast.develop.logicflow;

import lombok.extern.slf4j.Slf4j;
import org.fast.develop.logicflow.runtime.LogicRuntimeService;
import org.fast.develop.logicflow.runtime.task.delegate.DelegateTask;
import org.fast.develop.logicflow.runtime.task.delegate.TaskListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 莫寅
 * @createTime 2022-11-24 21:29
 * @desc：
 */
@Slf4j
@Component
public class ServiceTaskListener implements TaskListener {

    @Autowired
    private LogicRuntimeService runtimeService;

    @Override
    public void notify(DelegateTask delegateTask) {

        log.info("name:{}", delegateTask.getResourceProperties());
        log.info("testTaskListener的变量:{}", delegateTask.getVariableInstances());
    }
}
